<!DOCTYPE html>
<html lang="zh">

	<head>
		<script src="js/Global.js"></script>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>商品支付</title>
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/weui.min.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery-weui.min.css" />
		<style>
			body {
				background: #f9f9f9;
			}
		</style>
	</head>

	<body>
		<div class="schooltop">
			<div class="schooltp">
				<div class="schooltp1">
					<div class="sctp1fl">
						<div class="splogin">
							
						</div>
					</div>
					<div class="sctp1fr">
						<div class="shopcart">
							<a class="nerr" href="shopcart.html" target="_blank">
								<img src="img/shopcrat.png" alt="" class="gwcimg" />
								<span class="gwctxt">我的购物车</span>
							</a>
						</div>
					</div>
				</div>
				<!--<div class="schooltp2">
					<p class="schoolmc">阿克苏地区库车中等职业技术学校--欢迎您</p>
				</div>-->
			</div>

		</div>
		<div class="cashier">
			<div class="cashiercon">
				<div class="cashiercon1">
					<script type="text/javascript">
						var data = JSON.parse(localStorage.getItem("ordernos"));
						for (var i=0;i<1;i++) {
							document.write('<p class="ddxq">订单已提交成功，请尽快付款！订单号：'+data[i]+'</p>');
						}
						
					</script>
					
					<p class="ddnotice"><span style="color: red;">*</span>请您在24小时内完成支付，否则订单会被自动取消。</p>
				</div>
				<div class="cashiercon2">
                <div  class='zftop' id='paymoney'></div>

					
					<div class="zfbom">
						<div class="weixin">
							<p class="zfpic"><img src="img/weixin.png" alt="" class="zfimg1" /></p>
							<div class="saomiao">
								<div class="smfl">
									<p class="qr"><img  id='wexpayimg' src="" alt="" class="ewm" /></p>
									<div class="sys">
										<div class="sysfl">
											<img src="img/sao.png" alt="" class="sysimg" />
										</div>
										<div class="sysfr">
											<p class="syp1">打开手机微信</p>
											<p class="syp2">扫一扫付款</p>
										</div>
									</div>
								</div>
								<div class="smfr">
									<p class="smpic"><img src="img/weixinjt.png" alt="" class="smimg" /></p>
								</div>
							</div>
						</div>
						<div class="zhifubao">
							<p class="zfpic"><img src="img/zhifu.jpg" alt="" class="zfimg1" /></p>
							<div class="saomiao">
								<div class="smfl">
									<p class="qr"><img id='alipayimg' src="" alt="" class="ewm" /></p>
									<div class="sys">
										<div class="sysfl">
											<img src="img/sao.png" alt="" class="sysimg" />
										</div>
										<div class="sysfr">
											<p class="syp1">打开支付宝</p>
											<p class="syp2">扫一扫付款</p>
										</div>
									</div>
								</div>
								<div class="smfr">
									<p class="smpic"><img src="img/zhifujt.png" alt="" class="smimg" /></p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="shopbottom">
			<div class="shopbmcon">
				<p class="schoolname">
					<a href="http://www.worlduc.com/e/default.aspx?eid=2784009" target="_blank">阿克苏地区库车中等职业技术学校</a>
				</p>
				<p class="schoolname">学校地址：阿克苏地区库车县福鸿路26号</p>
			</div>
		</div>
	</body>

</html>
<script src="js/jquery.min.js"></script>

<script src="js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="js/loginstate.js" ></script>
<script>
		jQuery(document).ready(function() {
			var data1 = JSON.parse(localStorage.getItem("ordernos"));
		var moneyS = 0;
		for(var i=0;i<data1.length;i++){
			var no = data1[i];
			$.ajax({
			type: "post",
			url: requesturl + "order/order",
			async: false,
			data:{
				'orderno':no
			},
			xhrFields: {
				withCredentials: true
			},
			success: function(data) {
				moneyS =Number(moneyS)+Number(data.data.money);
			},
			error: function(data) {
				alert("网络原因发送失败：" + data.responseText);
			}
		});
		}
		$('#paymoney').text('应付金额：'+moneyS);
		$('#wexpayimg').attr('src',requesturl+'/order/qrimage?money='+moneyS);
		$('#alipayimg').attr('src',requesturl+'/order/qrimage?money='+moneyS);
		
//		$.ajax({
//			type: "get",
//			url: requesturl + "order/qrimage",
//			async: false,
//			data:{
//				'money':moneyS
//			},
//			xhrFields: {
//				withCredentials: true
//			},
//			success: function(data) {
//		       var data = JSON.parse(data.data);
//            $('#wexpayimg').attr('src','data:image/png;base64,'+data.img);
//			},
//			error: function(data) {
//				alert("网络原因发送失败：" + data.responseText);
//			}
//		});
		
		
		
	});
</script>
